<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>z-index设置定位元素z轴的距离</title>
    <style>
        #one{
            width: 200px;
            height: 200px;
            background: #0040ff;
            position: absolute;
            top: 100px;
            left: 100px;
            z-index: 1;
        }
        #two{
            width: 200px;
            height: 200px;
            background: #ffc800;
            position: absolute;
            top: 150px;
            left: 150px;

        }
    </style>
</head>
<body>
<div id="one"></div>
<div id="two"></div>
</body>
</html>